With the gradual development of computer application technologies, various electronic devices are increasingly popular, and applications based on electronic devices, such as ebook readers and browsers, are also increasingly rich. These applications usually need to display pictures inside the application. For example, a user reads an ebook or browses a web page by displaying picture content.
However, currently, picture content in an application is usually displayed by establishing a bitmap object of a true color format. That is, in the established bitmap object, the picture content is displayed by using a color of each pixel in a pixel buffer. However, each pixel of the pixel buffer in the bitmap object of the true color format needs to occupy a storage space of at least 16 bits.
Therefore, in a scenario in which there is a relatively large number of displayed pictures or the sizes of displayed pictures are relatively large, the memory of an electronic device may be exhausted easily, leading to the occurrence of system errors. In particular, this problem may be amplified in a mobile terminal such as a smartphone with a limited memory. Consequently, the function and the stability of an application are affected.